package builder;

import java.util.Arrays;
import java.util.List;
import java.util.Map;

public class Client {
    public static void main(String[] args) {
        // 场景1：生成Markdown简单文档
        DocumentBuilder mdBuilder = new MarkdownBuilder();
        DocumentDirector mdDirector = new DocumentDirector(mdBuilder);
        try {
            Document simpleMd = mdDirector.buildSimpleDocument(
                    "Java建造者模式",
                    "建造者模式适合构建组件复杂、配置灵活的对象。"
            );
            System.out.println("=== Markdown简单文档 ===");
            System.out.println(simpleMd);
        } catch (IllegalArgumentException e) {
            System.err.println(e.getMessage());
        }
    }
}